package com.cskaoyan.shopping.controller;

import com.cskaoyan.mall.commons.result.ResponseData;
import com.cskaoyan.mall.commons.result.ResponseUtil;
import com.cskaoyan.shopping.dto.PanelDto;
import com.cskaoyan.shopping.service.IHomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * @author fan
 * @Description:
 * @since 2023/01/09 22:08
 */
@RestController
public class HomepageController {
    @Autowired
    IHomeService homeService;

    @GetMapping("shopping/homepage")
    public ResponseData homepage() {
        List<PanelDto> homepage = homeService.homepage();
        return new ResponseUtil().setData(homepage);
    }
}
